﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Cosmos.Hardware;

namespace SplitOS
{
    public static class StroboGUI
    {
        public static void Initialize()
        {
            int color = 0;
            // Enter an endless loop
            while (true)
            {

                Cosmos.Hardware.VGAScreen screen = new Cosmos.Hardware.VGAScreen();

                // Enter VGA Mode
                screen.SetMode320x200x8();

                // Add the colors Black, White, Red, Green, Blue
                // screen.SetPaletteEntry(int index, byte r, byte g, byte b);[/color]
                screen.SetPaletteEntry(0, 0, 0, 0); // Black
                screen.SetPaletteEntry(1, 255, 255, 255); // white
                screen.SetPaletteEntry(2, 255, 0, 0); // red
                screen.SetPaletteEntry(3, 0, 255, 0); // green
                screen.SetPaletteEntry(4, 0, 0, 255); // blue

                // START THE STROBO =D
                if (color < 4) { color++; screen.Clear(color); }
                else if (color == 4) { color = 0; screen.Clear(color); }

            }
        }
    }
}